package com.nanyang.tms.dao.forecast;

import com.nanyang.tms.domain.forecast.ForecastDO;
import com.nanyang.tms.domain.forecast.ForecastDetailVO;
import com.nanyang.tms.domain.forecast.ForecastDetailVolumeVO;
import com.nanyang.tms.domain.forecast.ForecastQuery;
import com.nanyang.tms.domain.forecast.ForecastVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * <p>ForecastDao.java</p>
 * <p>Description:()</p>
 *
 * @author lv
 * @date 2022年11月12日 下午10:33:25
 * @Copyright Copyright (c) 2020 www.nanyang.cn Inc. All rights reserved.
 */
@Mapper
public interface ForecastDao {
    /**
     * <p>deleteByPrimaryKey</p>
     * <p>Description:(根据主键删除)</p>
     *
     * @param id
     * @return int
     */
    int deleteByPrimaryKey(Long id);

    /**
     * <p>insert</p>
     * <p>Description:(新增（所有列）)</p>
     *
     * @param record
     * @return int
     */
    int insert(ForecastDO record);

    /**
     * <p>selectByPrimaryKey</p>
     * <p>Description:(根据主键查询)</p>
     *
     * @param id
     * @return ForecastDO
     */
    ForecastDO selectByPrimaryKey(Long id);

    /**
     * <p>updateByPrimaryKeySelective</p>
     * <p>Description:(修改(选择的列))</p>
     *
     * @param record
     * @return int
     */
    int update(ForecastDO record);

    /**
     * 总数
     * @param query
     * @return
     */
    int countForecast(ForecastQuery query);

    /**
     * 列表
     * @param query
     * @return
     */
    List<ForecastVO> listForecast(ForecastQuery query);

    /**
     * 根据预报编码查询
     * @return
     */
    ForecastVO selectByCode(String forecastCode);
    
    ForecastDetailVO getForecastDetail(String ticketNo);
    
    List<ForecastDetailVolumeVO> listForecastVolumeBy(String ticketNo);
    
    
    /**
     * 根据预报编码和企业编码查询
     * @return
     */
    ForecastVO selectByCompanyCode(ForecastQuery query);

    /**
     * 取消预报
     * @param record
     * @return
     */
    int cancelState(ForecastDO record);

    /**
     * 更新打印状态
     * @param record
     * @return
     */
    int updatePrint(ForecastDO record);
}